# pip install "uvicorn[standard]"
# pip install fastapi
# pip install sqlmodel
# pip install psycopg2-binary
# pip install pycryptodome

from fastapi import FastAPI
from app.user_app import (
    add_user_routes
)

from app.llm_app import (
    add_llm_routes
)

from api.app.llm_factory_app import (
    add_llm_factory_routes
)

from api.app.user_llm_app import add_user_llm_routes

from api.app.knowledgebase_app import add_knowledgebase_routes

from api.app.knowledgebase_item_app import add_knowledgebase_item_routes

app = FastAPI()

# 用户管理
add_user_routes(app)

# 知识库管理
add_knowledgebase_routes(app)
add_knowledgebase_item_routes(app)

# 设置
add_user_llm_routes(app) # 用户llm
add_llm_routes(app) # llm
add_llm_factory_routes(app) # llm-factory

# 搜索

# GBI

# Agen

# 文件管理

# 笔记

if __name__ == "__main__":
    import uvicorn
    uvicorn.run("server:app", host="0.0.0.0", port=8765, reload=True,log_level="debug", workers=1)
